{% extends "tabler/dashboard_base.html" %}
{% from "helpers/_formhelpers.html" import render_field %}

{% block title %}appname settings{% endblock %}

{% block body %}

<div class="my-3 my-md-5">
    <div class="container">
        <div class="row">
            <div class="col-3">
                {% include 'settings/sidebar.html' %}
            </div>
            <div class="col-9">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Linked Accounts</h3>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
                                <thead>
                                    <tr>
                                    <th>Provider</th>
                                    <th class="text-center">Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <div>
                                                <i class="fa fa-google"></i> Login with Google
                                            </div>
                                        </td>
                                        <td class="text-center">
                                            {% if current_user.oauth['google'] %}
                                                Already Linked. <a href="{{ url_for('google.login') }}">Refresh Link</a>
                                            {% else %}
                                                <a href="{{ url_for('google.login') }}" class="btn btn-primary btn-block">
                                                    <i class="fa fa-google"></i> Login with Google
                                                </a>

                                            {% endif %}

                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}
